

import crypto from 'crypto';
import fs from 'fs';
import { Controller, GET, POST } from 'fastify-decorators';
import { FastifyReply, FastifyRequest } from 'fastify';
import puppeteerService from '../service/puppeteer.service';
import { z } from 'zod';
import { app } from '..';
import { PUBLIC_PATH, TMP_PATH } from '../config/env';
import dayjs from 'dayjs';
import { UserApiCall } from '@prisma/client';
import userService from '../service/user.service';


@Controller({ route: '/subscription' })
export default class SubscriptionController {

    @GET({ url: '/list' })
    async getPageContent(request: FastifyRequest, reply: FastifyReply) {
        const list = await app.prisma.subscriptionPlan.findMany();
        return app.json(list);
    }
}
